
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>我的旅行单</title>
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <link rel="stylesheet" href="/js/bootstrap-4.1.1-dist/css/bootstrap.min.css">
    <script src="/js/jquery/jquery.min.js"></script>
    <script src="/js/bootstrap-4.1.1-dist/js/bootstrap.min.js"></script>
    <link rel="stylesheet" href="/css/font/css/font-awesome.min.css"/>
    <link rel="stylesheet" href="/css/reset.css"/>
    <link rel="stylesheet" href="/css/message.css" />
    <script src="/js/plugins/jrender/jrender.min.js"></script>
    <link rel="stylesheet" href="/js/plugins/dialog2/dialog.css"/>
    <script src="/js/plugins/dialog2/dialog.min.js"></script>
    <script src="/js/common.js"></script>
    <script src="/css/bight/js/neon_text.js"></script>
    <script src="/js/checkLogin.js"></script>
    <script>
        $(function () {
            $(document).ready(function(){
                $('.first_neon').neonText();
                $('.good').neonText({
                    textColor:'yellow',
                    textSize:'10pt',
                    neonHighlight:'green',
                    neonHighlightColor:'#008000',
                    neonHighlightHover:'#FFFF00',
                    neonFontHover:'gray'
                });
            });


            var userId = JSON.parse(sessionStorage.getItem("user")).id;

            var currentPage = 1;//当前页
            var pages;//总页数
            var strategyData=[];//定义一个数组用来接收每次分页时的数据
            function query() {
                $.get(baseUrl+"/mytravellists/"+userId+"/strategies",{currentPage:currentPage},function (data) {
                    console.log(data);
                    $("#userStrategy").renderValues({list:data},{
                        getHref: function (item, value) {
                            var url  = $(item).data("href");
                            $(item).attr("href",url+value);
                        }
                    })
                });
            }

            query();
            //监听滚动事件,当滚动条发生变化时触发
            $(window).scroll(function(){
                //document滚上去的高度+手机窗口的高度 >= 整个文档的高度
                if (($(document).scrollTop()+$(window).height()) >= $(document).height()-1){
                    if (currentPage <= pages){//如果当前页数小于等于总页数
                        query();
                    }else {
                        $(document).dialog({
                            type : 'notice',
                            content: '<span class="info-text">我是有底线的!</span>',
                            autoClose: 1000,
                            position: 'bottom'
                        });
                    }
                }
            });
        });
    </script>
</head>
<body>
<div class="search-head">
    <div class="row nav-search">
        <div class="col">
            <a href="/mine/profiles.html">
                <span><i class="fa fa-chevron-left" ></i></span>
            </a>
        </div>
        <div class="col">
            <span>我的旅行单</span>
        </div>
        <div class="col"></div>
    </div>
</div>
<div id="userStrategy">
    <div render-loop="list">
        <ul class="list-group">
            <a data-href="/strategyCatalogs.html?id=" render-key="list.strategy_id" render-fun="getHref">
                <li class="list-group-item d-flex justify-content-between align-items-center">
                    <div class="item">
                        <img render-src="list.coverUrl" width="30px"/>
                        <span render-html="list.title"></span>
                        <span class="good">已被加入我的旅游购物车</span>
                    </div>
                    <div class="item">
                        <span style="font-size: 5px;" class="aui-flex-add" >2019-06-04</span>
                    </div>
                </li>
            </a>
        </ul>
    </div>
</div>
</body>
</html>